package responsibility.filter;

import responsibility.chain.FilterChain;
import responsibility.http.Request;
import responsibility.http.Respones;


public class PortFilter extends HttpRequestAndResponesFilter {

    @Override
    void doRequest(Request request) {
        System.out.println("  PortFilter.doRequest() ");
        if (request.getPort().contains("8080")) {
            request.setMessage(request.getMessage()+" 非法 port 地址 ");
        }

    }

    @Override
    void doRespones(Respones response) {
        System.out.println("  PortFilter.doRespones() ");
    }
}
